package xiangya.bysj.client.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import xiangya.bysj.service.impl.SMSServiceImpl;
import xiangya.bysj.util.StringUtil;

@Controller
@RequestMapping("/client/SMS")
public class SMSClientController {
	@Resource(name="SMSService")
	private SMSServiceImpl SMSService;
	
	@RequestMapping("/sendVercode")
	@ResponseBody
	public String sendVercode(String phone){
		String result = null;
		try {
			result = SMSService.sendVercode(phone);
		} catch (Exception e) {
			result = StringUtil.RES_FAIL;
			e.printStackTrace();
		}
		return result;
	}
}
